<?php if($data){ ?>
			<table width = "795" cellpadding = "2" cellspacing = "2" border = "0" align = "center" bgcolor = "#D4D0C8">
			<tr> <th colspan = "5"> HÓA ĐƠN </th></tr>
			<tr class = "list"> 
				<td width = "200" valign = "top"> <div align = "center"> <b>Tên Khách Hàng</b> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"> <b>Ngày Lập</b> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"> <b> Người Lập </b> </div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <img src="public/images/b_edit.png"/> Sửa</div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <img src="public/images/b_drop.png"/> Xóa </div> </td>
			</tr>
			<?php foreach ($data['listhd'] as $key => $value) { ?>
			<tr> 
				<td width = "200" valign = "top"> <div align = "center">
				<?php
				if(is_array($data['listkh'])){
					foreach ($data['listkh'] as $item){
						if($item['MaKH']==$value['MaKH']){ 
							echo $item['TenKH'];
						}
					}
				}
				?> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"><?php echo $value['NgayLap'];?> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"><?php echo $value['NguoiLap'];?> </div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <a href = "admin.php?mod=edit_hoadon&id=<?php echo $value['MaHD'];?>"> Sửa </a></div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <a href = "admin.php?mod=del_hoadon&id=<?php echo $value['MaHD'];?>"> Xóa </a> </div> </td>
			</tr>
			<?php
				}		
			?>
		</table>
<?php 
	}
?>